<template>
  <div>
    <el-collapse v-bind="$attrs" v-model="activeName">
      <el-collapse-item name="1">
        <template v-slot:title>
          <div style="margin-left: 5px">
            {{ title }}
          </div>
        </template>
        <div style="margin: 5px">
          <slot />
        </div>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";

type Prop = {
  title?: string;
};

defineProps<Prop>();

const activeName = ref("1");
</script>

<style>
.el-collapse {
  border: 0;
}
</style>
